package com.xjiye_test.payServer.servletGroup.weixinpublic;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class JsApiTicket extends HttpServlet {
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("UTF-8");
        PrintWriter out = resp.getWriter();
        String reStr="{\"errcode\":0,\"errmsg\":\"ok\",\"ticket\":\"kgt8ON7yVITDhtdwci0qefr7pw6Chj3k06dhok4Z-KepAYxa3-F8HmHDTGs0KeNqlllUpTm6dF3ND4urDiMHhw\",\"expires_in\":7200}";;
        req.setCharacterEncoding("UTF-8");
        out.println(reStr);
        out.flush();
    }

    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req,resp);
    }
}
